#include <stdio.h>
#include <unistd.h>

int main()
{
    printf("before:I am a process, pid:%d,ppid:%d\n",getpid(),getppid());

    // 标准写法
    execl("/usr/bin/ls", "ls", "-a", "-l", NULL);

    printf("after:I am a process, pid:%d,ppid:%d\n",getpid(),getppid());
    
    return 0;
}
